﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PublishData.BLL
{
    public static class StringUtils
    {
        public static bool IsNullOrEmpty(this string st)
        {
            return string.IsNullOrEmpty(st);
        }

        public static string Truncated(this string str, int length)
        {
            if (string.IsNullOrEmpty(str))
                return "";
            else
                if (str.Length > length)
                    return str.Substring(0, length);
                else
                    return str;
        }
    }
}
